package com.baseframe.advert.sign;


import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum AdvertType {
    IMAGE(1,"图片"),
    VIDEO(2,"视频"),
    TEST(3,"文本"),

    ;

    private final int code;
    private final String name;

    public static String getAdvertTypeName(Integer code){
        String name = null;

        for (AdvertType value : values()) {
            if (value.code == code){
                name = value.name;

                break;
            }
        }

        return name;
    }

}
